<div id="lista_keret">
    <a href="<?php echo url_for( "apartment/show?id=".$apartman->getId() );?>" class="ap_link"> 
    <div id="lista1">
    <?php
	$c = new Criteria();
	$c->addAscendingOrderByColumn( jwGalleryPicturePeer::ORDER );
	$pics = $apartman->getjwGallery()->getjwGalleryPictures( $c );
	$picture = $pics[0];
    ?>
    <?php if ( $pics[0] ): ?>
        <img src="<?php echo url_for( "jwGallery/getImage?id=".$picture->getId() ) ?>" alt="picture of apartement" id="kep" width="300" height="200" border="0" />
	<?php else : ?>
		<img src="/images/default.jpg" alt="picture of apartement" id="kep" width="300" height="200" border="0" />
    <?php endif ?>

        <div id="leiras">
			<div class="apartman-quick-info" >
				<table align="center" >
					<tr>
						<td>
							<img src="/images/icons/icon-people-s.png" alt="<?php echo __('max_occupancy') ?>" title="<?php echo __('max_occupancy') ?>" >
						</td>
						<td>
							<?php echo $apartman->getMaxOccupancy(); ?>
						</td>
					</tr>
					<tr>
						<td>
							<img src="/images/icons/icon-bed-s.png" alt="<?php echo __('number_of_bedrooms') ?>" title="<?php echo __('number_of_bedrooms') ?>" >
						</td>
						<td>
							<?php echo $apartman->getBedrooms(); ?>
						</td>
					</tr>
					<tr class="no-border" >
						<td>
							<img src="/images/icons/icon-bath-s.png" alt="<?php echo __('number_of_bathrooms') ?>" title="<?php echo __('number_of_bathrooms') ?>" >
						</td>
						<td>
							<?php echo $apartman->getBathrooms(); ?>
						</td>
					</tr>						
				</table>
			</div>
            <h1><?php echo $apartman->getName(); ?></h1>			
            <p><?php echo $apartman->getShortDetails(); ?></p>
	    <div class="fader" ></div>
        </div>
        <div id="ertekeles">
            <h2>Rating: <?php echo $apartman->getRating() ?>/5,00 (<?php echo $apartman->getNBRating(); ?>)</h2>
            <p class="csillag">
            	<select name='myRating<?php echo $apartman->getId(); ?>' class='rating' id='star<?php echo $apartman->getId(); ?>' >
	    			<option value="1">Allomright</option>
	    			<option value="2">Ok</option>
					<option value="3">Getting Better</option>
	    			<option value="4">Pretty Good</option>
					<option value="5">Awesome</option>
				</select>
            </p>
        </div>
        </div>
    </a>
    <center><img src="/images/motivum.gif" name="motivum" width="93" height="24" id="motivum" /></center>
</div>
<script type="text/javascript">
$(function(){
	$('#star<?php echo $apartman->getId(); ?>').val(<?php echo $apartman->getRating() ?>).change();
	$('.ui-rating').unbind('mouseenter mouseleave');
});
</script>